export default {
  data() {
    return {
      allData:{}
    }
  },
  mounted() {
    this.getData();
  },
  methods: {
    async getData() {
      let data = await $http.get("plugin.stock-service.frontend.controllers.home.index", {});
      if (data.result) {
        this.allData = data.data;
        this.fun.setWXTitle(data.data.name);
      } else {
        this.$toast(data.msg);
      }
    },
    goStockAggregatePage() {
      this.$router.push(this.fun.getUrl('stockAggregatePage',{},{}));
    },
    goMyInventoryPage(name) {
      this.$router.push(this.fun.getUrl('myInventory',{name},{}));
    },
    goInventoryDetailsPage(name) {
      this.$router.push(this.fun.getUrl('inventoryDetails',{name},{}));
    },
    goRevenueDetailsPage() {
      this.$router.push(this.fun.getUrl('revenueDetails',{},{}));
    },
    goFinancialStatementspage() {
      this.$router.push(this.fun.getUrl('financialStatements',{},{}));
    },
    // 存货订单
    inventoryOrder() {
      this.$router.push(this.fun.getUrl('orderlist',{ status: '0', orderType: 'stockServiceInventory'},{}));
    },
    // 提货订单
    pickUpOrders() {
      this.$router.push(this.fun.getUrl('orderlist',{ status: '0', orderType: 'stockServicePickUp'},{}));
    }
  }
};
